﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Content.aspx.cs" Inherits="manage_channel_Content" %>
<%@ Register Src="../../controls/PageNavigator.ascx" TagName="PageNavigator" TagPrefix="uc1" %>
<%@ Import Namespace="System.Data" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
<link href="../../sysImages/<%Response.Write(NetCMS.Config.UIConfig.CssPath());%>/css/css.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/javascript" src="../../configuration/js/Prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="../../configuration/js/Public.js"></script>
</head>
<body>                                      
    <form id="form1" runat="server">
    <table id="top1" width="100%"  border="0" cellpadding="0" cellspacing="0" class="toptable">
        <tr>
          <td height="1" colspan="2"></td>
        </tr>
        <tr>
          <td width="57%" class="sysmain_navi" style="padding-left:14px;">内容列表</td>
          <td width="43%">位置导航：<a href="../main.aspx" class="list_link" target="sys_main">首页</a><img alt="" src="../../sysImages/folder/navidot.gif" border="0" /><a href="list.aspx" class="list_link" target="sys_main">频道列表</a><img alt="" src="../../sysImages/folder/navidot.gif" border="0" /><a href="Class_list.aspx?ChID=<%Response.Write(Request.QueryString["ChID"]); %>" class="list_link" target="sys_main">栏目列表</a><img alt="" src="../../sysImages/folder/navidot.gif" border="0" />内容列表</td>
        </tr>
    </table>


    <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="Navitable">
      <tr>
        <td  style="padding-left:12px;">
        <span class="reshow">查询：</span>
        <asp:DropDownList ID="gClassID" runat="server" onchange="getClass(this);">
        <asp:ListItem Value=""> - 选择栏目 - </asp:ListItem>
        </asp:DropDownList><%if (addStr != string.Empty)
                             { %>
        &nbsp;<a href="Content_add.aspx?ChID=<%Response.Write(Request.QueryString["ChID"]); %>&ClassID=<% Response.Write(Request.QueryString["ClassID"]); %>" class="reshow" >添加<%Response.Write(itemname); %></a><%} %>
        <span runat="server" id="classAll">&nbsp;┋&nbsp;<a class="topnavichar" href="content.aspx?ChID=<%Response.Write(Request.QueryString["ChID"]); %>&ClassID=<% Response.Write(Request.QueryString["ClassID"]); %>" title="本栏目所有信息">列表</a></span>
        &nbsp;&nbsp;<a class="topnavichar" href="content.aspx?ChID=<%Response.Write(Request.QueryString["ChID"]); %>" title="所有信息">全部</a>
        &nbsp;&nbsp;<a href="Content.aspx?ChID=<%Response.Write(Request.QueryString["ChID"]); %>&ClassID=<% Response.Write(Request.QueryString["ClassID"]); %>&stat=rec" class="topnavichar" >推荐</a>
        &nbsp;&nbsp;<a href="Content.aspx?ChID=<%Response.Write(Request.QueryString["ChID"]); %>&ClassID=<% Response.Write(Request.QueryString["ClassID"]); %>&stat=hnews" class="topnavichar" >头条</a>
        &nbsp;&nbsp;<a href="Content.aspx?ChID=<%Response.Write(Request.QueryString["ChID"]); %>&ClassID=<% Response.Write(Request.QueryString["ClassID"]); %>&stat=hot" class="topnavichar" >热点</a>
        &nbsp;&nbsp;<a href="Content.aspx?ChID=<%Response.Write(Request.QueryString["ChID"]); %>&ClassID=<% Response.Write(Request.QueryString["ClassID"]); %>&stat=mar" class="topnavichar" >滚动</a>
        &nbsp;&nbsp;<a href="Content.aspx?ChID=<%Response.Write(Request.QueryString["ChID"]); %>&ClassID=<% Response.Write(Request.QueryString["ClassID"]); %>&stat=filt" class="topnavichar" >幻灯</a>
        &nbsp;&nbsp;<a href="Content.aspx?ChID=<%Response.Write(Request.QueryString["ChID"]); %>&ClassID=<% Response.Write(Request.QueryString["ClassID"]); %>&stat=constr" class="topnavichar" >用户发布</a>
        &nbsp;&nbsp;<a href="Content.aspx?ChID=<%Response.Write(Request.QueryString["ChID"]); %>&ClassID=<% Response.Write(Request.QueryString["ClassID"]); %>&stat=isadmin" class="topnavichar" >管理员发布</a>
        &nbsp;&nbsp;<a href="Content.aspx?ChID=<%Response.Write(Request.QueryString["ChID"]); %>&ClassID=<% Response.Write(Request.QueryString["ClassID"]); %>&stat=lock" class="topnavichar" >锁定的</a>
        &nbsp;&nbsp;<a href="Content.aspx?ChID=<%Response.Write(Request.QueryString["ChID"]); %>&ClassID=<% Response.Write(Request.QueryString["ClassID"]); %>&stat=unlock" class="topnavichar" >未锁定的</a>
        &nbsp;&nbsp;<a href="Content.aspx?ChID=<%Response.Write(Request.QueryString["ChID"]); %>&ClassID=<% Response.Write(Request.QueryString["ClassID"]); %>&stat=click" class="topnavichar" >点击率</a>
        </td>
      </tr>
      <tr>    
      <td  style="padding-left:12px;">
        <span class="reshow">操作：</span><%if (delStr != string.Empty){ %><asp:LinkButton ID="LinkButton6" runat="server" CssClass="topnavichar" OnClick="delContent" OnClientClick="{if(confirm('警告：确定要删除吗?')){return true;}return false;}">删除</asp:LinkButton><% }%>
        <%if (OneStr != string.Empty){ %>&nbsp;&nbsp;<asp:LinkButton ID="LinkButton5" runat="server" CssClass="topnavichar" OnClick="Reset_allContent" OnClientClick="{if(confirm('警告：确认要初始化吗?\n将删除站点中的所有信息!\n如果选择了栏目，则只初始化选定栏目的信息，否则初始化所有信息。')){return true;}return false;}">初始化</asp:LinkButton><% }%>
        <%if (lockStr != string.Empty){ %>&nbsp;&nbsp;<asp:LinkButton ID="LinkButton1" runat="server" CssClass="topnavichar" OnClick="Lock_allContent" OnClientClick="{if(confirm('警告：确认要锁定吗？')){return true;}return false;}">锁定</asp:LinkButton>
        &nbsp;&nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CssClass="topnavichar" OnClick="UnLock_allContent" OnClientClick="{if(confirm('警告：确认要解锁吗？')){return true;}return false;}">解锁</asp:LinkButton><% }%>
        <%if (ResetStr != string.Empty){ %>&nbsp;&nbsp;<asp:LinkButton ID="LinkButton7" runat="server" CssClass="topnavichar" OnClick="Reset_OrderID" OnClientClick="{if(confirm('警告：确认要重置权重吗？将设置为0(最低)')){return true;}return false;}">重置权重</asp:LinkButton><% }%>
       <%if (spStr != string.Empty){ %> &nbsp;&nbsp;<asp:LinkButton ID="LinkButton8" runat="server" CssClass="topnavichar" OnClick="ToSpecial">加入专题</asp:LinkButton> <% }%>
       <%if (xmlStr != string.Empty){ %> &nbsp;&nbsp;<asp:LinkButton ID="LinkButton3" runat="server" CssClass="topnavichar" OnClick="Makexml">生成XML</asp:LinkButton><% }%>
        <%if (htmStr != string.Empty){ %>&nbsp;&nbsp;<asp:LinkButton ID="LinkButton4" runat="server" CssClass="topnavichar" OnClick="MakeHtml" OnClientClick="{if(confirm('警告：确定要生成吗？如果您选择的信息过多，将大大消耗系统资源，谨慎使用')){return true;}return false;}">生成静态页面</asp:LinkButton> <% }%>
        &nbsp;&nbsp;<asp:TextBox ID="keywords" Width="60px" runat="server"></asp:TextBox><asp:Button ID="Button1" runat="server" Text="查询" OnClick="Search_Click" />
        &nbsp;&nbsp;&nbsp;&nbsp;当前栏目：<span id="cClassName" class="reshow" runat="server"></span> 
       </td>
      </tr>
      </table>
      <asp:Repeater ID="DataList1" runat="server">
       <HeaderTemplate>
        <table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" class="table">
          <tr class="TR_BG" style="text-align:left;">
            <td class="sys_topBg" style="width:30px;">权重</td>
            <td class="sys_topBg" style="width:250px;">标题</td>
            <td class="sys_topBg" style="width:100px;text-align:center;">栏目</td>
            <td class="sys_topBg" style="width:100px;text-align:center;">作者</td>
            <td class="sys_topBg" style="width:60px;text-align:center;">状态</td>
            <td class="sys_topBg" style="text-align:center;">操作 <input name="Checkboxc" type="checkbox" onclick="javascript:selectAll(this.form,this.checked);" /></td>
          </tr>
        </HeaderTemplate>
          <ItemTemplate>
          <tr class="TR_BG_list" onmouseover="overColor(this)" onmouseout="outColor(this)">
            <td style="text-align:center;"><a href="###" onclick="orderAction(<%#((DataRowView)Container.DataItem)["id"]%>,<%#((DataRowView)Container.DataItem)["orderID"]%>);" class="list_link" title="点击修改权重"><%#((DataRowView)Container.DataItem)["OrderID"]%></a></td>
            <td style="font-size:11.5px;"><%#((DataRowView)Container.DataItem)["CName"]%></td>
            <td style="text-align:center;"><%#((DataRowView)Container.DataItem)["ClassName"]%></td>
            <td style="font-size:11.5px;text-align:center;"><%#((DataRowView)Container.DataItem)["gauthor"]%></td>
            <td style="text-align:center;"><%#((DataRowView)Container.DataItem)["islocks"]%></td>
            <td style="text-align:center;"><%#((DataRowView)Container.DataItem)["op"]%>&nbsp;</td>
          </tr>
          </ItemTemplate>
          <FooterTemplate>
          </table>
          </FooterTemplate>
      </asp:Repeater>
      <div align="right" style="width:98%"><uc1:PageNavigator ID="PageNavigator1" runat="server"/></div>
    <br />
    <br />
    <table width="100%" border="0" cellpadding="8" cellspacing="0" class="copyright_bg" style="height: 76px">
       <tr>
         <td align="center"><label id="copyright" runat="server" /></td>
       </tr>
    </table>
    </form>
</body>
</html>
<script language="javascript" type="text/javascript">
function getClass(obj)
{
   window.location.href="content.aspx?ClassID="+obj.value+"&stat=<%Response.Write(Request.QueryString["stat"]); %>&ChID=<%Response.Write(Request.QueryString["ChID"]); %>";
}

function orderAction(id,orderid)
{
	var ReturnValue='';
	ReturnValue=prompt('输入权重(数字越大，排列越靠前)：',orderid);
	if ((ReturnValue!='') && (ReturnValue!=null))
	{
	    location.href='Content.aspx?ChID=<%Response.Write(Request.QueryString["ChID"]); %>&alock=order&Id='+id+'&OrderId='+ReturnValue;
	}
	else
	{
	    if(ReturnValue!=null)
	    {
	        alert('输入权重');
	    }    
	}
}

</script>
